import os
from datetime import datetime, timedelta

T = (2, 4, 8)
S = (32, 256, 1024, 16*1024, 256*1024)
S = (1, )


for t in T:
    for s in S:
        command = './1 {} {} > /dev/null'.format(t, s)
        time = timedelta(seconds=0)
        for i in range(4):
            start = datetime.now()
            os.system(command)
            time += datetime.now() - start
        print("{}\t{}\t{}".format(t, s, time.total_seconds() / 4))
